package cn.zyn.eduservice.excelTest;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @author ：zyn
 * @date ：Created in 2022/5/27 11:08
 * @description：
 * @modified By：
 * @version: $
 */
public class ExcelListener extends AnalysisEventListener <DemoData>{
    //一行一行读取excel
    @Override
    public void invoke(DemoData demoData, AnalysisContext analysisContext) {
        System.out.println("====="+ demoData);
    }

    //读取excel表头信息
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext
            context) {
        System.out.println("表头信息："+headMap);
    }
    //读取完成后
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("读取完成");
    }
}
